﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Web;
using DHQGHN.DAL.Models.DanhMuc;

namespace DHQGHN.Services
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IAdminUnitExtraService" in both code and config file together.
    [ServiceContract]
    public interface IAdminUnitExtraService
    {
        /// <summary>
        /// phunx1, 20150513: load danh sach hanh chinh mo rong theo ID
        /// </summary>
        /// <param name="adminUnitExtraID"></param>
        /// <returns></returns>
        [OperationContract]
        [WebGet(ResponseFormat = WebMessageFormat.Json,
            BodyStyle = WebMessageBodyStyle.Bare,
            UriTemplate = "GetByID/{adminUnitExtraID}"
            )]
        DAL.Models.DanhMuc.ADM_UNIT_EXT GetByID(string adminUnitExtraID);

        [OperationContract]
        [WebGet(ResponseFormat = WebMessageFormat.Json,
            BodyStyle = WebMessageBodyStyle.Bare,
            UriTemplate = "GetByAdminCodeAndType/{adminCode}/{strType}"
            )]
        IEnumerable<DAL.Models.DanhMuc.ADM_UNIT_EXT> GetByAdminCodeAndType(string adminCode, string strType);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="household"></param>
        [OperationContract]
        [WebInvoke(Method = "POST",
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json,
            UriTemplate = "AddAdminUnitExt")]
        void AddAdminUnitExt(DAL.Models.DanhMuc.ADM_UNIT_EXT adExt);
        //phunx1, 20150522: method get danh muc hanh chinh mo rong theo diabanid, id cha, type)

        /// <summary>
        /// phunx1, 20150522: lay admin extra theo areacode, parentid, type
        /// </summary>
        /// <param name="areaCode"></param>
        /// <param name="parentID"></param>
        /// <param name="strType"></param>
        /// <returns></returns>
        [OperationContract]
        [WebGet(ResponseFormat = WebMessageFormat.Json,
            BodyStyle = WebMessageBodyStyle.Bare,
            UriTemplate = "GetAdminExtDropDown/{adminCode}/{parentID}/{strType}"
            )]
        IEnumerable<DAL.Models.DanhMuc.ADM_UNIT_EXT> GetAdminExtDropDown(string adminCode, string parentID, string strType);
    }
}
